<%@ page language="java" import="java.util.*,com.hs.core.utils.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<script src='<%=basePath%>common/uploadify/jquery-1.5.1.min.js'></script> 
<script src='<%=basePath%>common/uploadify/swfobject.js'></script>
<script src='<%=basePath%>common/uploadify/jquery.uploadify.v2.1.4.min.js'></script>
<link rel="stylesheet" type="text/css" href="<%=basePath %>app/css/layout.css" />
<script src='<%=basePath%>thirtpart/jquery/jquery.blockUI.js'></script>
<script  src="<%=basePath %>common/javascript/common.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>common/uploadify/uploadify.css" />

<style>.tac{text-align:center}</style>
<script>
$(document).ready(function() {
  $('#file_upload').uploadify({
    'uploader'  : '<%=basePath%>common/uploadify/uploadify.swf',
    'script'    : '<%=basePath %>data/executestandardimport.do',
    'cancelImg' : '<%=basePath%>common/uploadify/cancel.png',
    'folder'    : '<%=basePath%>upload',
    'queueID'   : 'fileQueue',
    'fileDataName':'importfile',
    'auto'      : false,
    'muti'     : false,
    'multi': false, 
	'buttonImg' : '<%=basePath%>common/uploadify/selectfile.gif',  
	'fileExt'        : '*.xls',   
    'fileDesc'       : '请选择xls文件(*.xls)', 
    onComplete: function (event, queueID, fileObj, response, data) { 
   		 $.unblockUI();  
   		 $('#uploader_message').text(response); 
   		window.parent.stdlist.frameElement.src = "<%=basePath%>standard/standardlist.do"; 	
   　},
   	onError: function(event, queueID, fileObj) {      
		alert("数据导入失败！");
    },
    onOpen  : function(event,ID,fileObj) { 
       $.blockUI();  
    } 
    
  });
});
 
 </script>
</head>
<body>
 
    <table border="0" cellspacing="0" align=center cellpadding="0" class="list" style="width:97%">
      <tr>
        <th   style="text-align:center;  font-size:16px;">标准数据导入</th>
      </tr>
      <tr>
      	<td>
      		<div id="fileQueue" align="center"> 
              <input id="file_upload" name="file_upload" type="file" />	&nbsp;&nbsp;
              <input type="button" onclick="jQuery('#file_upload').uploadifyUpload()" value="开始上传" class="butto"/> 
              <input type="button" onclick="jQuery('#file_upload').uploadifyClearQueue()" value="取消上传" class="butto"/>
            </div>
      	</td>
      	</tr>
      	<tr>
      	<td>
      		<font size=3 color=red> <span id="uploader_message"></span></font>
      	</td>
       </tr>
      	<tr>
      	<td>
      		<font color=red>导入前请下载标准数据导入模板！</font><a href="javaScript:onclick=openwindow('<%=basePath %>app/data/标准数据导入格式.xls','0','0','')">标准数据导入表格模板（点击下载）</a> 
      	</td>
      </tr>
    </table>
    
</body>
</html>
